import React from 'react'
import { View } from '@tarojs/components'
import { DayListProps } from '@COMPONENTS/Calendar/types/Calendar'
import classnames from 'classnames'

export default class DayList extends React.PureComponent<DayListProps> {
  public render(): JSX.Element {
    const { showHeaderLine } = this.props

    return (
      <View className="at-calendar__header header">
        <View className={classnames('header__flex', { 'header__flex-showLine': showHeaderLine })}>
          <View className="header__flex-item">一</View>
          <View className="header__flex-item">二</View>
          <View className="header__flex-item">三</View>
          <View className="header__flex-item">四</View>
          <View className="header__flex-item">五</View>
          <View className="header__flex-item">六</View>
          <View className="header__flex-item">日</View>
        </View>
        {showHeaderLine && <View className="header__line" />}
      </View>
    )
  }
}
